<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/5/16
 * Time: 16:09
 */

namespace app\admin\controller;


use app\admin\model\Payset;

class PaysetController extends BaseController
{
    public function index()
    {
        if($this->request->isPost()) {
            $data = input('post.');
            (new Payset())->isUpdate(true)->update($data,['id' => 1]);
            return array('msg' => '更新成功','status' => 1,'icon' => 1);
        }
        $this->assign([
            'info' => Payset::find(),
        ]);
        return $this->fetch();
    }
}